package com.yyfax.ph.base;

import com.yyfax.ph.main.MainActivity;
import org.robolectric.Robolectric;
import org.robolectric.TestLifecycleApplication;
import org.robolectric.android.controller.ActivityController;

import java.lang.reflect.Method;

/**
 * Created by xiongyufeng on 2017/9/25.
 * Copyright  2017 www.yylending.com. All Rights Reserved.
 */
public class LefecycleUnLoginApplication extends YJPH implements TestLifecycleApplication {
	@Override
	public void beforeTest(Method method) {
		BasicTestRunner.asyncToSync();
		BasicTestRunner.printLog();
	}

	@Override
	public void prepareTest(Object test) {
		ActivityController<MainActivity> mActivityController = Robolectric.buildActivity(MainActivity.class);
		MainActivity aty = mActivityController.create().visible().get();
		mActivityController.start().resume();

	}

	@Override
	public void afterTest(Method method) {
	}
}
